FIG. 18 is a diagram showing the constitution of a coding device using a type of conventional coding method known as an adaptive differential pulse code modulation (hereinafter ADPCM) method. In FIG. 18, reference numeral 1 represents a data input terminal, 2 represents a data output terminal, and 3a and 3b represent adders. Reference numeral 4 represents a step size adaptation unit for determining a coding step size in the ADPCM method, and 5 represents a differential coding unit for coding differential data based on the step size determined by the step size adaptation unit 4. Reference numeral 6 represents a differential decoding unit for decoding differential data from the step size determined by the step size adaptation unit 4 and the data coded by the differential coding unit 5, and 7 represents a one-sample delay unit for holding data of one sampling time.
The operation of the conventional coding device shown in FIG. 18 will be explained below.
A coding device using an ADPCM method has the following two characteristic features. Firstly, it codes the differential value between present data to be coded and the immediately preceding data. Secondly, based on the result of coding the differential value, it adapts the step size so as to determine the step size in the next coding operation.
As a specific example, a case in which four bits of ADPCM data are obtained from sixteen bits of PCM data will be explained below.
The step size adaptation unit 4 performs the following processing to adapt the step size in accordance with data of the differential coding unit 5. Since the input data are coded as four bits of ADPCM data, there are sixteen values of coded data from -8 to 7. For instance, when the coded data is -8 or 7, a coefficient of 2.4 is applied to the step size. Similarly, a coefficient of 2 is applied when the coded data is -7 or 6, a coefficient of 1.6 is applied when the coded data is -6 or 5, a coefficient of 1.2 is applied when the coded data is -5 or 4, and a coefficient of 0.9 is applied in all other cases. When this calculation produces a step size which is less than a predetermined minimum step size value, the step size is set to the minimum step size value. Furthermore, when the step size that has been calculated exceeds a predetermined maximum step size value, the step size is set to the maximum step size value.
The differential coding unit 5 subtracts the output of the adder 3a from the step size determined by the step size adaptation unit 4. When the result of the subtraction is outside a range expressible by four bits, e.g. 8 or more, or -9 or less, a limit of 7 and -8 is respectively applied.
The differential decoding unit 6 multiplies the output of the differential coding unit 5 and the output of the step size adaptation unit 4.
FIG. 19 shows specific calculation processes carried out by the coding device using the ADPCM method shown in FIG. 18. The input data is in the form of a sin curve as shown in FIG. 20.
In FIG. 19, "No." represents the data number, "Input: PCM (hexadecimal)" is the PCM data input from the digital data input terminal 1 expressed in hexadecimal numbers. "Input: PCM (decimal)" is the value obtained by converting the hexadecimal data into decimal numbers. "Differential" is the output of the adding unit 3a. "Step size" represents the step size determined by the step size adaptation unit 4. "Output: ADPCM data" represents the ADPCM data which has been coded by the differential coding unit 5 and output from the ADPCM coding data output terminal 2. "Differential decode" represents the decoded value obtained by the differential decoding unit 6. "Decoded data" is the output of the adder 3b, and "Difference between input and decoded data" represents the difference between the input PCM data and the decoded value of the ADPCM coded data (aforementioned decoded data).
The calculation process of the specific example shown in FIG. 19 will be explained in sequence. This example refers to ADPCM coding, in which the initial value of the one-sample delay unit 7 is zero, and the initial value of the step size is 1. Furthermore, the minimum step size is 1, and the maximum step size is 4681.
In No. 1, since the input PCM value is zero and the initial value of the one-sample delay unit 7 is also zero, the output of the adder 3a is zero, and the output of the differential coding unit 5 (i.e. the output ADPCM data) is also zero. Further, the output of the differential decoding unit 6 is zero, and the decoded data is also zero. Prior to executing the data of No. 2, the step size adaptation unit 4 applies the coefficient of 0.9 (which is applied in all other cases as described above) to the initial value of 1. The result of this computation is 0.9, and since this is lower than the minimum step size value, the step size is set to a value of 1.
In No. 2, the input data is 1606, the value of the one-sample delay unit 7 is zero, the output of the adder 3a is 1606, and the output of the differential coding unit 5 is 7. Therefore, the output ADPCM data is also 7, the output of the differential decoding unit 6 is 7, and the output of the adder 3b is also 7. Consequently, the step size adapting unit 4 sets the step size to 2.4.
In No. 3, since the input is 3149 and the value of the one-sample delay unit 7 is 7, the output of the adder 3a is 3142, and the output of the differential coding unit 5 is 7. Therefore, the output ADPCM data is also 7, the output of the differential decoding unit 6 is 16.8, and the output of the adder 3b is 23.8. Consequently, the step size adaptation unit 4 sets the step size to 5.76. Subsequent computations are repeated in the same way, and further explanation will be omitted.
However, coding devices using the conventional ADPCM method described above have been known to suffer overload distortion and load distortion.
FIG. 21 shows decoded data obtained after coding the sin curve shown in FIG. 20 in a coding device using the conventional ADPCM method.
FIG. 22 shows the difference between the input data shown in FIG. 20 and the decoded data obtained by the ADPCM method shown in FIG. 21. As shown in FIG. 22, it is impossible to track the abrupt changes in the initial data, and a great distortion, known as overload distortion, occurs between the data from No. 1 to No. 11.